package com.zzxy.springmvc5.controller;

import com.zzxy.springmvc5.po.Student;
import com.zzxy.springmvc5.po.studentExt;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class StudentController {
    @RequestMapping("register")
    public String register() {
        return "/user/register";
    }
    @RequestMapping("sddStu")
    public String addStu(String username, String password) {
        System.out.println(username);
        System.out.println(password);
        //1. service biz >> insert into user values().
        return "/user/list";
    }
    @RequestMapping("addStu1")
    public String addStu1(Student student){
        System.out.println(student.toString());
        return "/user/list";
    }
    @RequestMapping("addStu2")
    public String addStu1(studentExt ext){
        System.out.println(ext);
        return "/user/list";
    }
}
